package com.mycompany;

import com.jsftoolkit.base.ResourceConstants;
import com.jsftoolkit.base.ResourceInfo;
import com.jsftoolkit.base.ResourceInfo.Type;
import com.jsftoolkit.gen.builder.ComponentBuilder;

/**
 * This is your component specification. This is how you tell the code
 * generators what you want. See the new component developer guide at
 * {@link http://www.jsftoolkit.com }.
 * 
 * @author noah
 * 
 */
public class MyComponentSpec extends ComponentBuilder {

	{
		// this provides the name and package for your component
		named("MyComponent").in("com.mycompany");

		// A component has a bunch of string identifiers associated with it.
		// If you don't understand what these identifiers are supposed to be,
		// just make sure that name, type, and rendererType are different
		// from the values given to your other components
		// Almost any alphanumeric value is OK.
		inFamily("com.mycompany.MyFamily").ofType(
				"com.mycompany.MyComponentType");

		// the path to your template is relative to the 'src/main/resources'
		// directory, but with a leading slash.
		withRenderer("com.mycompany.HtmlMyComponentRenderer").withTemplate(
				"/com/mycompany/MyComponent.xhtml");

		// to have resources automatically included in the page when your
		// component is used, you need to provide some basic information
		// 1. a unique ID. This could just be some variation on the path (2)
		// 2. the path to the resource, relative to 'src/main/resources' with
		// a leading slash.
		// 3. the type of resource it is, Type.SCRIPT or Type.STYLE for
		// javascripts and stylesheets respectively.
		// 4. the character encoding, probably "UTF-8"
		// 5. the filter. Used for skinning and advanced usage. Leave it null
		// for now.
	}

}